<template>
  <file :name="name" :value="value" :is_info="is_info" :size="size" :more="more" :config="this_config" :protocol="protocol" :is_list="is_list" :download="download"
        @update:value="$emit('update:value', $event)" @change="$emit('change', $event)"></file>
</template>

<script>
import file from "@/components/auto_import/UnifyParam/file.vue";
export default {
  _title_: '图片',
  _can_config_: true,
  _can_form_param_public_: true,
  _can_form_param_: true,
  name: "file_img",
  components: {file},
  props: ['name', 'value', 'config', 'is_info', 'more', 'protocol', 'size', 'is_list', 'download'],
  emits: ['update:value', 'change'],
  computed: {
    this_config(){
      let def = ['jpg','jpeg','png','gif','webp'];
      if (!this.config) return def.join(',');
      let arr = [];
      (this.config+'').split(',').forEach(function (v){
        if (~def.indexOf(v)) arr.push(v);
      })
      return arr.join(',');
    }
  },
}
</script>

<style scoped>

</style>